package org.dashboard.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.dashboard.bean.AdDataset;

import java.util.List;

@Mapper
public interface AdDatasetMapper {
    int deleteByPrimaryKey(Integer datasetId);

    int insert(AdDataset record);

    int insertSelective(AdDataset record);

    AdDataset selectByPrimaryKey(Integer datasetId);

    int updateByPrimaryKeySelective(AdDataset record);

    int updateByPrimaryKeyWithBLOBs(AdDataset record);

    int updateByPrimaryKey(AdDataset record);

    List<AdDataset> selectAdDatasets();

    int checkDatasetCodeExist(@Param("datasetCode")String datasetCode,@Param("datasetId")Integer datasetId);

    AdDataset selectAdDatasetByCode(@Param("datasetCode")String datasetCode);

    List<AdDataset> selectAdDatasetsBySchemaId(@Param("schemaId")Integer schemaId);

    List<AdDataset> selectAdDatasetsSearched(@Param("criteria")String criteria);

}